﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace HamcoWcs.DAL.Migrations
{
    public partial class A3 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "NextNode",
                table: "node_info",
                type: "varchar(255)",
                maxLength: 255,
                nullable: false,
                comment: "下一个节点 ‘；’分割",
                oldClrType: typeof(string),
                oldType: "varchar(100)",
                oldMaxLength: 100,
                oldComment: "下一个节点 ‘；’分割")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateIndex(
                name: "IX_path_info_PathName",
                table: "path_info",
                column: "PathName",
                unique: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_path_info_PathName",
                table: "path_info");

            migrationBuilder.AlterColumn<string>(
                name: "NextNode",
                table: "node_info",
                type: "varchar(100)",
                maxLength: 100,
                nullable: false,
                comment: "下一个节点 ‘；’分割",
                oldClrType: typeof(string),
                oldType: "varchar(255)",
                oldMaxLength: 255,
                oldComment: "下一个节点 ‘；’分割")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");
        }
    }
}
